import java.util.HashMap;

public class HashDemo {

    public static void main(String[] args) {

//        test2();
        test3();

    }

    static void test3() {
        HashMap<String, String> stringStringHashMap = new HashMap<>();
        for (int i = 1; i < 17; i++) {
            if (i == 12) {
                System.out.println("" + i);
            }
            stringStringHashMap.put("" + i, "" + i);
        }
    }

    static void test2() {
        int hash = 0;
        for (int i = 1; i < 17; i++) {
            System.out.println(i + "--" + (hash = hash("" + i)) + "---" + (hash & 15) + "--" + (hash & 31));
        }
    }


    static void test1() {
        String key = "1111111111111111111";
        System.out.println(hash(key));
        int h = key.hashCode();
        System.out.println(h);
        System.out.println(h >>> 16);
        System.out.println(h ^ (h >>> 16));
    }


    static final int hash(Object key) {
        int h;
        return (key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16);

    }

}
